package com.xj.homework.pattern.factory.factoryMethod;

/**
 * 每一种类型的产品都创建一个工厂，用具体的工厂，创建对应的产品。
 */
public class Test {
    public static void main(String[] args) {
        PhoneFactory sunSongFactory = new SunSongFactory();
        Phone phone = sunSongFactory.createPhone();
        phone.call();
        PhoneFactory factory = new AppleFactory();
        Phone phone1 = factory.createPhone();
        phone1.call();
    }
}
